layoutInit= function() {
    var ps = tb_getPageSize();
                
    var hd_h = 50;
    var ft_h = 25;
    var lf_w = 190;
                
    var tmp1 = 0;
    var tmp2 = 0;
    if($.browser.msie) {
        tmp1 = 6;
        tmp2 = 6*3;
    } else {
        tmp1 = 6 + 3;
        tmp2 = 6*3 + 4;
    }
    var ct_h = ps[1] - hd_h - ft_h - tmp1;
    var ct_w = ps[0] - lf_w - tmp2;
                
    $("#header").css("height", hd_h + "px");
    $("#footer").css("height", ft_h + "px");
    $("#left").css("width", lf_w + "px");
    $("#left").css("height", ct_h + "px");
    $("#content").css("width", ct_w + "px");
    $("#content").css("height", ct_h + "px");
        
    // 窗口大小变化时重新设置布局
    if($.browser.msie) {
        $("#box").resize(layoutInit);
    } else {
        window.onresize = layoutInit;
    }
}

pageInit = function() {
    // 设置工作流定义列表
    Workflow.setListWorkflow();
        
    // 显示
    setHideShow("WorkflowDefs");
        
    // thickbox 初始化
    tb_init('a.thickbox, area.thickbox, input.thickbox');
}

setHideShow = function(contentId) {
    var c = ["WorkflowDefs", "WorkflowContents", "WorkflowTasks", "WorkflowImages"];
    for(var i = 0; i < c.length; i++) {
        if(contentId == c[i]) {
            $("#" + c[i]).attr("style", "display:");
        } else {
            $("#" + c[i]).attr("style", "display:none");
        }
    }
}